﻿@model Transport.Areas.Administrator.Models.DeliverySuccessModel
@{
    ViewBag.Title = "Báo Phát Thành Công";
}
@using (Html.BeginForm("DeliverySuccess", "ParcelDelivery", FormMethod.Post))
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Areas/Administrator/Content/images/ico-catalog.png")" alt="" />
            Báo Phát Thành Công (Bưu phẩm còn lại: @Model.ParcelLeft)
        </div>
        <div class="options">
			<button type="submit" name="save" value="Save" tabindex="6" class="t-button">Lưu</button>
        </div>
    </div>
    
    <table width="99%">
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Mã vận đơn")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.TrackingNumbers)
                @Html.ValidationMessageFor(model => model.TrackingNumbers)
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Ngày nhận")
                <span class="field_required">*</span>
            </td>
            <td style="padding-bottom:5px">
                @Html.Telerik().DateTimePickerFor(model => model.ReceivedDate)
                @Html.ValidationMessageFor(model => model.ReceivedDate)
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Người nhận")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.Receiver)
                @Html.ValidationMessageFor(model => model.Receiver)
            </td>
        </tr>
    </table>
}

<script type="text/javascript">
    $(document).ready(function () {
        jQuery.validator.methods["date"] = function (value, element) { return true; };
        $('#TrackingNumbers').focus();

        $('#TrackingNumbers').keypress(function (event) {
            if (event.keyCode == 13) {
                event.preventDefault();
            }
            else if (event.keyCode == 46) {
                $(this).val('');
            }
        });
    });
</script>